[#ftl]
[#include "editor/editor.ftl"/]
[#include "EditorWidget.ftl"/]
[#include "EditorFactory.ftl"/]
[#include "FloatingPane.ftl"/]
[#include "MetadataEditorPane.ftl"/]
[#include "MetadataEditorTabPane.ftl"/]
[#include "MetadataStylesEditorPane.ftl"/]
[#include "MetadataPropertiesEditorPane.ftl"/]

[#include "MetadataEventListenerEditorPane.ftl"/]
[#--
[#include "MetadataSpecEditorPane.ftl"/]
--]
[#include "MetadataSourceEditorPane.ftl"/]

[@define "agile.MetadataWorkspace" "agile.FloatingPane"]
  	name:"Metadata"	
 	[#assign contentTemplateString][#compress]
	 	<div class="content" data-dojo-type="dijit/layout/TabContainer" data-dojo-props="tabPosition:'top',style:'width:100%;height:100%'">	 		
			
	 	</div>[/#compress]
	 [/#assign]	
 	,contentTemplateString:"${contentTemplateString?js_string}"	
 	,constructor:function(){ 
 		this.helpText = agile.i18n("metadata_help",null,"Configurate the widget's properties");
	 	this.subscribe("agile.widget.selected",function(widget){
	 		this.setSubtitle(widget==null?"&nbsp;":widget.getDescription());
		});
	 
	 	aspect.after(this,"createPane",lang.hitch(this,function(){			
			array.forEach(window.metadataPanes,lang.hitch(this,function(pane){
				this.mainContainer.addChild(pane);
			}))
	 	}));
 	}
 	,getDefaultLocation:function(){
		return {left:"450px",top:"110px"};		 
	}
 	,getResizableSize:function(){
		return {height:"360px",width:"570px"};		 
	}
[/@]


 window.metadataPanes = [];
 [@bootstrapChains "Step3/3 Initializing Property Editor"]
 window.metadataPanes.push(new agile.MetadataPropertiesEditorPane());
 [/@]	
 [@bootstrapChains "Step3/3 Initializing Style Editor"]
 window.metadataPanes.push(new agile.MetadataStylesEditorPane());
 [/@]
 [@bootstrapChains "Step3/3 Initializing Event Editor"]
 window.metadataPanes.push(new agile.MetadataEventListenerEditorPane());
 [/@]	
 [@bootstrapChains "Step3/3 Initializing Source Editor"]
 window.metadataPanes.push(new agile.MetadataSourceEditorPane());
 [/@] 